package user.zc.excel.data.wrap;

import user.zc.excel.WriteDTO;
import org.apache.poi.ss.util.CellRangeAddress;

public class TitleMergedRegionWrapper extends AWrapper{
    public TitleMergedRegionWrapper(AWrapper next) {
        super(next);
    }

    @Override
    public WriteDTO merge(WriteDTO writeDTO) {
        for (int i = 0; i < writeDTO.getTitles().length; i++) {
            //int firstRow, int lastRow, int firstCol, int lastCol
            writeDTO.getTitles()[i].setCra(new CellRangeAddress(i,i,0,writeDTO.getColumns().length-1));
        }
        return writeDTO;
    }
}
